<script>
  init({
    title: 'Custom Search',
    desc: 'Use `customSearch` option to custom search function is executed instead of built-in search function. In this case, we only search the price column.',
    links: ['bootstrap-table.min.css'],
    scripts: ['bootstrap-table.min.js']
  })
</script>

<table
  id="table"
  data-search="true"
  data-custom-search="customSearch"
  data-url="json/data1.json">
  <thead>
    <tr>
      <th data-field="id">ID</th>
      <th data-field="name">Item Name</th>
      <th data-field="price">Item Price</th>
    </tr>
  </thead>
</table>

<script>
  function mounted() {
    $('#table').bootstrapTable({
      formatSearch: function () {
        return 'Search Item Price'
      }
    })
  }

  function customSearch(data, text) {
    return data.filter(function (row) {
      return row.price.indexOf(text) > -1
    })
  }
</script>
